<template>
  <div class="container">
    <el-card v-if="!isAdd" body-style="padding:0px 16px">
      <el-row type="flex" justify="end">
        <el-button type="primary" plain style="margin:16px" size="small" @click="isAdd=true">创建考试</el-button>
      </el-row>
      <ExamList />
    </el-card>
    <!-- 新增 -->
    <el-card v-else body-style="padding:0px 16px 20px">
      <div slot="header">
        <el-row type="flex" justify="space-between" align="middle">
          <el-col>
            <span style="font-weight:700">新增考试</span>
          </el-col>
          <el-col>
            <el-row type="flex" justify="end">
              <el-button type="primary" plain size="small" @click="isAdd=false">返回列表</el-button>
            </el-row>
          </el-col>
        </el-row>
      </div>
      <AddExam />
    </el-card>
  </div>
</template>
<script>

export default {
  name: '',
  components: {},
  props: {},
  data() {
    return {
      isAdd: false
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {}
}
</script>
<style  lang='scss' scoped>
.container{
  margin: 20px;
}
.el-card__body{
  padding: 0 16px;
}
::v-deep .el-card__header{
padding: 10px;
margin: 0px 0 20px;
}
</style>
